"use strict";

module.exports = app => {
  const { STRING, INTEGER, BOOLEAN } = app.Sequelize;

  const MovieClass = app.model.define(
    "movie_class",
    {
      id: { type: INTEGER, primaryKey: true, autoIncrement: true },
      name: STRING(100),
      show: BOOLEAN,
      idx: INTEGER(4),
    },
    {
      timestamps: true,
      createdAt: "created_at",
      updatedAt: "updated_at",
      freezeTableName: true,
    }
  );

  return MovieClass;
};
